function profit(item) {
    if(item==1){
        history.go(-1)
    }else if(item==2){

        location.href = '../AddSurplusDisk/AddSurplusDisk.html'
    }
}
var _Deter=document.querySelector('.Deter')
//删除
var _Successfull=document.querySelector('.Successfull')
function Delete(item){
    if(item==1){
        _Deter.style.display='block'
        _Successfull.style.display='none'
    }else if(item==2){
        _Deter.style.display='none'
        _Successfull.style.display='none'
    }else if(item==3){
        _Deter.style.display='none'
        _Successfull.style.display='block'
        setTimeout(function(){
            location.href='../InventoryManagement/InventoryManagement.html'
        },3000)
    }
}

function check() {
    location.href = '../AssetDetails/AssetDetails.html'
}
function TakeStock(){
    location.href='../AssetInventory/AssetInventory.html'
}
//点击事件
var surplu = document.querySelectorAll('.surplur')
var colo = document.querySelectorAll('.colour-1')
var electron = document.querySelector('.Electronic-1')
var elect = document.querySelector('.Electronic-2')
var _coun = document.querySelector('.Counted')
var _count = document.querySelector('.Counted-1')
console.log(colo);

function surplus(item) {
    if (item == 1) {
        surplu[0].className = 'colour'
        colo[0].style.display = 'block'
        surplu[1].className = ''
        colo[1].style.display = 'none'
        surplu[2].className = ''
        colo[2].style.display = 'none'
        surplu[3].className = ''
        colo[3].style.display = 'none'
        electron.style.display = 'block'
        elect.style.display = 'block'
        _coun.style.display = 'none'
        _count.style.display = 'none'
    } else if (item == 2) {
        surplu[0].className = ''
        colo[0].style.display = 'none'
        surplu[1].className = 'colour'
        colo[1].style.display = 'block'
        surplu[2].className = ''
        colo[2].style.display = 'none'
        surplu[3].className = ''
        colo[3].style.display = 'none'
        electron.style.display = 'none'
        elect.style.display = 'none'
        _coun.style.display = 'block'
        _count.style.display = 'block'
    } else if (item == 3) {
        surplu[0].className = ''
        colo[0].style.display = 'none'
        surplu[1].className = ''
        colo[1].style.display = 'none'
        surplu[2].className = 'colour'
        colo[2].style.display = 'block'
        surplu[3].className = ''
        colo[3].style.display = 'none'
        colo[3].style.display = 'none'
        electron.style.display = 'none'
        elect.style.display = 'none'
        _coun.style.display = 'block'
        _count.style.display = 'none'
    } else {
        surplu[0].className = ''
        colo[0].style.display = 'none'
        surplu[1].className = ''
        colo[1].style.display = 'none'
        surplu[2].className = ''
        colo[2].style.display = 'none'
        surplu[3].className = 'colour'
        colo[3].style.display = 'block'
        colo[3].style.display = 'block'
        electron.style.display = 'none'
        elect.style.display = 'none'
        _coun.style.display = 'none'
        _count.style.display = 'block'
    }
}